/* 
 * File:   Token.cpp
 * Author: bryan
 * 
 * Created on September 6, 2013, 12:04 AM
 */

#include "Token.h"
#include <string>
#include <sstream>
using namespace std;

Token::Token() {
	lineNum = -1;
	value = "Constructor Defualt";
	type = "CONSTRUCTOR_DEFAULT";
}
Token::Token(int lineNum, string value, string type) {
    this->lineNum = lineNum;
    this->value = value;
    this->type = type;
}

string Token::toString() {
	stringstream buffer;
	string _lineNum;

	buffer << lineNum;
	buffer >> _lineNum;
	string temp;
	temp = "(" + type + ",\"" + value + "\"," + _lineNum + ")";
	return temp;
}

void Token::setType(string _type) {
	this->type = _type;
}

int Token::getLineNum() {
	return lineNum;
}

string Token::getValue() {
	return value;
}

string Token::getType() {
	return type;
}

